<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>一些开发过程中常用的转换工具-够意思博客</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="/static/layui/css/layui.css"  media="all">
</head>
<body>

<blockquote class="layui-elem-quote">
	一些开发过程中常用的转换工具
</blockquote>

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
	<legend>当前时间</legend>
</fieldset>

<div class="layui-form-item">
	<div class="layui-inline">
		<label class="layui-form-label">当前时间</label>
		<div class="layui-input-inline">
			<input class="layui-input" value="{$current_date}"/>
		</div>
	</div>
	<div class="layui-inline">
		<label class="layui-form-label">当前时间戳</label>
		<div class="layui-input-inline">
			<input class="layui-input" value="{$current_time}"/>
		</div>
	</div>
</div>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
	<legend>转换时间</legend>
</fieldset>
<form class="layui-form-pane" action="">
	<div class="layui-form-item">
		<div class="layui-inline">
			<label class="layui-form-label">转换时间戳</label>
			<div class="layui-input-block">
				<div class="layui-input-inline" style="width: 100px;">
					<input type="text" name="year" lay-verify="number" placeholder="年" autocomplete="off" class="layui-input" value="{$current_year}">
				</div>
				<div class="layui-form-mid">-</div>
				<div class="layui-input-inline" style="width: 100px;">
					<input type="text" name="month" lay-verify="number" placeholder="月" autocomplete="off" class="layui-input" value="{$current_month}">
				</div>
				<div class="layui-form-mid">-</div>
				<div class="layui-input-inline" style="width: 100px;">
					<input type="text" name="day" lay-verify="number" placeholder="日" autocomplete="off" class="layui-input" value="{$current_day}">
				</div>
				<div class="layui-form-mid">-</div>
				<div class="layui-input-inline" style="width: 100px;">
					<input type="text" name="hour" lay-verify="number" placeholder="时" autocomplete="off" class="layui-input" value="{$current_hour}">
				</div>
				<div class="layui-form-mid">-</div>
				<div class="layui-input-inline" style="width: 100px;">
					<input type="text" name="minute" lay-verify="number" placeholder="分" autocomplete="off" class="layui-input" value="{$current_minute}">
				</div>
				<div class="layui-form-mid">-</div>
				<div class="layui-input-inline" style="width: 100px;">
					<input type="text" name="second" lay-verify="number" placeholder="秒" autocomplete="off" class="layui-input" value="{$current_second}">
				</div>
				<div class="layui-input-inline"style="width: 100px;">
					<button class="layui-btn">转换</button>
				</div>
				{if $str_to_time}
				<div class="layui-inline">
					<label class="layui-form-label">{$str_to_time|default:''}</label>
				</div>
				{/if}
			</div>
		</div>
	</div>
</form>
<form class="layui-form-pane" action="">
	<div class="layui-form-item">
		<div class="layui-inline">
			<label class="layui-form-label">转换时间</label>
			<div class="layui-input-block">
				<div class="layui-input-inline" style="width: 100px;">
					<input type="text" name="timestamp" lay-verify="number" class="layui-input" value="{if $timestamp > 0}{$timestamp}{else}{$current_time}{/if}">
				</div>
				<div class="layui-input-inline" style="width: 100px;">
					<button class="layui-btn" >转换</button>
				</div>
			</div>
		</div>
		{if $time_to_str}
		<div class="layui-inline">
			<input class="layui-input" value="{$time_to_str}"/>
		</div>
		{/if}
	</div>
</form>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
	<legend>MD5转换</legend>
</fieldset>
<form class="layui-form-pane" action="">
	<div class="layui-form-item">
		<div class="layui-inline">
			<label class="layui-form-label">需转换字符</label>
			<div class="layui-input-block">
				<div class="layui-input-inline" style="width: 100px;">
					<input type="text" name="md5_str" placeholder="字符串" autocomplete="off" class="layui-input" value="{$md5_str}">
				</div>
				<div class="layui-input-inline" style="width: 100px;">
					<button class="layui-btn" >转换</button>
				</div>
			</div>
		</div>
		{if $md5_val_lower}
		<div class="layui-inline">
			<label class="layui-input">{$md5_val_lower}</label>
			<label class="layui-input">{$md5_val_upper}</label>
		</div>
		{/if}
	</div>
</form>
<script src="/static/layui/layui.js" charset="utf-8"></script>
<script src="/static/layui/model/tools.js" charset="utf-8"></script>
</body>
</html>
